Both front-end and back-end notes can log messages for debugging.
api.log
The API log feature integrates with the script editor and it displays
all the messages logged via api.log. This
works for both back-end and front-end scripts.
The API log panel will appear after executing a script that uses
api.logand it can be dismissed temporarily by pressing the close
button in the top-right of the panel.
Apart from strings, an object can be passed as well in which case it will be pretty-formatted if possible (e.g. recursive objects are not supported).
For logs that are not directly visible to the user, the standard
console.logcan be used as well.